package com.alpha.eceasy.mall.controller.inner;

import com.alpha.eceasy.mall.api.entity.MallOrder;
import com.alpha.eceasy.core.R;
import com.alpha.eceasy.mall.service.MallOrderService;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 订单
 *
 * @author huangpengfei
 * @since 2022-02-11 16:55:59
 */
//@Inner
@RestController
@RequiredArgsConstructor
@RequestMapping("/inner/order")
@Tag(description  = "order", name = "订单")
public class MallOrderInnerController {

	private final MallOrderService payOrderService;

	/**
	 * 通过id查询订单
	 *
	 * @param mallOrder 查询条件
	 * @return R 返回结果
	 */
	@GetMapping
	public R<MallOrder> getOne(MallOrder mallOrder) {
		return R.ok(payOrderService.getOne(Wrappers.<MallOrder>lambdaQuery(mallOrder)));
	}

}
